<template>
    <div class="clearfix">
        <div class="fl" style="width: 70%;">
            <div class="base-info-box">
                <div class="base-info-row">
                    <p class="base-info-label-cell">昵称：</p>
                    <p class="base-info-data-cell">{{infoData.u_nickname}}</p>
                </div>
                <div class="base-info-row">
                    <p class="base-info-label-cell">公司名称：</p>
                    <p class="base-info-data-cell">{{infoData.u_enterprise_name}}</p>
                </div>
                <div class="base-info-row">
                    <p class="base-info-label-cell">所在地：</p>
                    <p class="base-info-data-cell">{{infoData.pName}}-{{infoData.cName}}</p>
                </div>
                <div class="base-info-row">
                    <p class="base-info-label-cell">企业规模：</p>
                    <p class="base-info-data-cell">{{infoData.u_enterprise_scale | scaleOpt}}</p>
                </div>
                <div class="base-info-row">
                    <p class="base-info-label-cell">成立时间：</p>
                    <p class="base-info-data-cell">{{(infoData.u_enterprise_time)? infoData.u_enterprise_time.substr(0,10):''}}</p>
                </div>
                <div class="base-info-row">
                    <p class="base-info-label-cell">详细地址：</p>
                    <p class="base-info-data-cell">{{infoData.u_enterprise_address}}</p>
                </div>
                <div class="base-info-row">
                    <p class="base-info-label-cell">企业网站：</p>
                    <p class="base-info-data-cell">{{infoData.u_enterprise_website}}</p>
                </div>
                <div class="base-info-row">
                    <p class="base-info-label-cell">注册资金：</p>
                    <p class="base-info-data-cell">{{infoData.u_registered_capital}}</p>
                </div>
                <div class="base-info-row">
                    <p class="base-info-label-cell">法人名称：</p>
                    <p class="base-info-data-cell">{{infoData.u_legal_person}}</p>
                </div>
                <div class="base-info-row">
                    <p class="base-info-label-cell">企业电话：</p>
                    <p class="base-info-data-cell">{{infoData.u_enterprise_phone}}</p>
                </div>
                <div class="base-info-row">
                    <p class="base-info-label-cell">企业邮箱：</p>
                    <p class="base-info-data-cell">{{infoData.u_enterprise_email}}</p>
                </div>
                <div class="base-info-row">
                    <p class="base-info-label-cell">企业介绍：</p>
                    <p class="base-info-data-cell">{{infoData.u_enterprise_info}}</p>
                </div>
            </div>
        </div>
        <div class="fr" style="width: 28%;">
            <div class="base-info-box-header-icon centerauto">
                <img v-if="infoData.u_head_portrait" :src="infoData.yuming + infoData.u_head_portrait"/>
                <img v-else src="../../../assets/images/userPic.png"/>
            </div>
        </div>
    </div>
</template>
<script>

    export default {
        data(){
            return{
                infoData: {},
            }
        },
        filters: {
            scaleOpt: function(value){
                if(value == 1){
                    return '20人以下'
                }else if(value == 2){
                    return '20-99人'
                }else if(value == 3){
                    return '100-499人'
                }else if(value == 4){
                    return '500-999人'
                }else if(value == 5){
                    return '1000-9999人'
                }else if(value == 6){
                    return '10000人以上'
                }
            },
        },
        methods: {
            init(){

                var _this = this;

                this.$httpGet('/api/index/Personal_center/enterpriseInfo',{
                    'u_id': window.localStorage.uid,
                }).then(response => {
                    
                    if(response.code == 200){

                        _this.infoData = response.msg;
                        
                    }else{
                        this.$message({
                            message: response.msg,
                            type: 'warning'
                        });
                    }

                });
            },
        },
        mounted(){
            this.init();
        },
    }
</script>
